/**
 * 
 */
package com.ms.game.itembox.db;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import com.ms.game.itembox.ItemChangeWay;
import com.ms.player.PlayerUserType;
import com.xpec.c4.db.model.log.basic.BasicTransactionLogModel;

/**
 * 玩家金錢異動的 log
 * 
 * @author TW15010
 */
@Entity
@Table(name = "player_item_change")
@org.hibernate.annotations.Table(
		appliesTo = "player_item_change", indexes =
		{
				@org.hibernate.annotations.Index(name = "IDX_ORDER_ID", columnNames = { "orderId" }),
		}
)
public class PlayerItemChangeLogModel extends BasicTransactionLogModel {
	private static final long serialVersionUID = 2672791127082655420L;

	/** account guid */
	private String accountId;

	/** player guid */
	private String playerId;

	/** player name */
	private String playerName;

	/** 使用者類型 {@link PlayerUserType} */
	private int userType;

	/** 遊戲館id */
	private String gameHallId;

	/** 遊戲館名 */
	private String gameHallName;
	
	/** 道具序號 */
	private String itemSn;

	/** 道具id */
	private String itemId;

	/** 道具名 */
	private String itemName;

	/** 異動數量 */
	private long changeCount;

	/** 異動前數量 */
	private long beforeChange;

	/** 變更後數量 */
	private long afterChange;

	/**
	 * 行為id {@link ItemChangeWay}
	 */
	private int changeWay;

	/** 行為說明 */
	private String changeWayDesc;

	/** 目標角色的 guid */
	private String targetId;

	/** 目標角色的 name */
	private String targetName;

	/**
	 * 來源道具序號<br>
	 * 如果有將另一個堆疊的道具合併進來的行為，要填入來源道具堆疊的序號
	 */
	private String fromItemSn;

	/**
	 * 目的道具序號<br>
	 * 如果有拆分可堆疊道具的行為，要將新產生的堆疊序號寫在這裡
	 */
	private String toItemSn;
	
	/** 精煉等級*/
	private int refineLevel;
	
	/** 額外設定*/
	private String extraSettings;

	public String getPlayerName() {
		return playerName;
	}

	public void setPlayerName(String playerName) {
		this.playerName = playerName;
	}

	public String getGameHallId() {
		return gameHallId;
	}

	public void setGameHallId(String gameHallId) {
		this.gameHallId = gameHallId;
	}

	public int getChangeWay() {
		return changeWay;
	}

	public void setChangeWay(int changeWay) {
		this.changeWay = changeWay;
	}

	public String getChangeWayDesc() {
		return changeWayDesc;
	}

	public void setChangeWayDesc(String changeWayDesc) {
		this.changeWayDesc = changeWayDesc;
	}

	public String getAccountId() {
		return accountId;
	}

	public void setAccountId(String accountId) {
		this.accountId = accountId;
	}

	public String getPlayerId() {
		return playerId;
	}

	public void setPlayerId(String playerId) {
		this.playerId = playerId;
	}

	public String getGameHallName() {
		return gameHallName;
	}

	public void setGameHallName(String gameHallName) {
		this.gameHallName = gameHallName;
	}

	public long getChangeCount() {
		return changeCount;
	}

	public void setChangeCount(long changeCount) {
		this.changeCount = changeCount;
	}

	public long getBeforeChange() {
		return beforeChange;
	}

	public void setBeforeChange(long beforeChange) {
		this.beforeChange = beforeChange;
	}

	public long getAfterChange() {
		return afterChange;
	}

	public void setAfterChange(long afterChange) {
		this.afterChange = afterChange;
	}

	public String getItemId() {
		return itemId;
	}

	public void setItemId(String itemId) {
		this.itemId = itemId;
	}

	public String getItemName() {
		return itemName;
	}

	public void setItemName(String itemName) {
		this.itemName = itemName;
	}

	public String getTargetName() {
		return targetName;
	}

	public void setTargetName(String targetName) {
		this.targetName = targetName;
	}

	public String getTargetId() {
		return targetId;
	}

	public void setTargetId(String targetId) {
		this.targetId = targetId;
	}

	public String getItemSn() {
		return itemSn;
	}

	public void setItemSn(String itemSn) {
		this.itemSn = itemSn;
	}

	public String getFromItemSn() {
		return fromItemSn;
	}

	public void setFromItemSn(String fromItemSn) {
		this.fromItemSn = fromItemSn;
	}

	public String getToItemSn() {
		return toItemSn;
	}

	public void setToItemSn(String toItemSn) {
		this.toItemSn = toItemSn;
	}

	public int getUserType() {
		return userType;
	}

	public void setUserType(int userType) {
		this.userType = userType;
	}

	public int getRefineLevel() {
		return refineLevel;
	}

	public void setRefineLevel(int refineLevel) {
		this.refineLevel = refineLevel;
	}

	@Column(columnDefinition="TEXT")
	public String getExtraSettings() {
		return extraSettings;
	}

	public void setExtraSettings(String extraSettings) {
		this.extraSettings = extraSettings;
	}
}